
// 统一请求路径前缀在libs/axios.js中修改
import {
  postRequestWithNoToken,
  getRequestWithNoToken,
  getRequest,
  postRequestWithHeaders,
  putRequestWithHeaders,
  putRequestWithHeadersJson,
  postRequestWithNoTokenData,
  deleteRequestWithHeaders
} from '@/libs/axios'


// 登录
export const PostUserLogin = (params) => {
  return postRequestWithNoTokenData(`/User/Login`, params)
  }

// 请求接口 获取用户信息
export const userInfo = (params) => {
return getRequest(`/User/GetUserInfo/`, params)
}
// 请求接口 获取全部省市地址
export const GetWahAreaTreeList = (params) => {
  return getRequest(`/User/GetWahAreaTreeList`, params)
}
// 请求接口 获取用户收货地址
export const GetUserReceiverAddressList = (params) => {
  return getRequest(`/User/GetUserReceiverAddressList`, params)
}
// 用户添加收获地址信息
export const CreateUserGoodsReceivingInfo = (params) => {
  return postRequestWithHeaders(`/User/CreateUserGoodsReceivingInfo`, params)
}
// 根据用户Id查询用户信息
export const GetUserInfo = (params) => {
return getRequestWithNoToken(`/User/GetUserInfo`, params)
}

// 根据用户Id查询我的积分列表
export const GetMyGiftOrderStockList = (params) => {
return getRequestWithNoToken(`/IntegralShop/GetMyGiftOrderStockList`, params)
}

// 修改用户信息中的地址
export const UpdateUserIntegralAddress = (params) => {
return putRequestWithHeadersJson(`/User/UpdateUserIntegralAddress/`, params)
}
// 根据用户Id 修改用户信息
export const UpdateUserInfo = (params) => {
return putRequestWithHeadersJson(`/User/UpdateUserInfo/`, params)
}

// 根据用户Id 获取会员中心列表
export const GetShoppData = (params) => {
return getRequestWithNoToken(`/OrderManaGement/GetShoppData/`, params)
}
//更新用户收获地址信息
export const UpdateUserReceiverAddress = (params) => {
return putRequestWithHeadersJson(`/User/UpdateUserReceiverAddress/`, params)
}
//设为默认地址
export const UpdateReceiverAddressAsDefaul = (params) => {
return putRequestWithHeaders(`/User/UpdateReceiverAddressAsDefaul/`, params)
}

//删除收货地址
export const DeleteUserReceiverAddress = (params) => {
return deleteRequestWithHeaders(`/User/DeleteUserReceiverAddress`, params)
}

// 取回密码
export const UpdatePass = (params) => {
return putRequestWithHeaders(`/User/UpdatePass/`, params)
}

// 获取短信验证码
export const smsSendSsm = (params) => {
return postRequestWithHeaders(`/Sms/SendSsm/`, params)
}

// 获取邮箱验证码
export const SendEmail = (params) => {
return postRequestWithHeaders(`/Sms/SendEmail/`, params)
}

// 会员认证
export const Authentication = (params) => {
return postRequestWithHeaders(`/User/Authentication/`, params)
}
